import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

// export const useMenuList = defineStore('menuList', () => {
//   const menu = ref<string[]>(['home', 'about', 'page1', 'page2'])
//   function changeMenu(newMenu: string[]) {
//     menu.value = newMenu
//   }

//   return { menu, changeMenu }
// })
export const useMenuList = defineStore('menuList', {
  state: () => {
    return {
      menu: ['home', 'productListStable', 'settingAccountView', 'productListSForm']
    }
  },
  actions: {
    changeMenu(newMenu: string[]) {
      this.menu = newMenu
    }
  }
})
